package com.yuhs.zixing.study.design.pattern.dp002.structural.s003.decorator.d002;

/**
 * @description:
 * @author: yuhs
 * @date: 2022/5/1 9:21 PM
 */
public class HighScoreDecorator002 extends Decorator002 {
    //构造函数
    public HighScoreDecorator002(SchoolReport002 sr) {
        super(sr);
    }

    //我要汇报最高成绩
    private void reportHighScore() {
        System.out.println("这次考试语文最高是75，数学是78，自然是80");
    }

    //我要在老爸看成绩单前告诉他最高成绩，否则等他一看，就抡起扫帚揍我，我哪里还有机会说啊
    @Override
    public void report() {
        this.reportHighScore();
        super.report();
    }
}
